﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Mrhd.Core.Entities
{
    /// <summary>
    /// 权限描述项（既可绑定角色，可以绑定用户）
    /// </summary>
    [Table("Sys_AccessAuthority")]
    [Comment("权限描述项")]
    public class AccessAuthorityEntity: Entity
    {
        /// <summary>
        /// 路由名称
        /// </summary>
        [Comment("路由名称")]
        [MaxLength(64)]
        public string Name { get; set; }
        /// <summary>
        /// 绑定的用户
        /// </summary>
        [Comment("绑定的用户")]
        public int? UserId { get; set; }
        /// <summary>
        /// 用户实体
        /// </summary>
        [Comment("用户实体")]
        public virtual UserEntity User { get; set; }
        /// <summary>
        /// 绑定的角色
        /// </summary>
        [Comment("绑定的角色")]
        public int? RoleId { get; set; }
        ///// <summary>
        ///// 角色实体
        ///// </summary>
        //[Comment("角色实体")]
        //public virtual Role Role { get; set; }
    }
}
